- If your AI-generated code becomes faulty, who faces the most liability exposure?
- These discoutned earbuds deliver audio so high quality, you'll forget they're mid-range
- This Galaxy Watch is one of my top smartwatches for 2024 and it's received a huge discount
- One of my favorite Android smartwatches isn't from Google or OnePlus (and it's on sale)
- The Urgent Need for Data Minimization Standards
Cisco Catalyst Center Template Labs – Rest-APIs – Part 9
Overview
In this episode of our ongoing Catalyst Center Automation Series, our focus moves to Rest-APIs and using postman to automate the network. We will change our focus from templating to automation through Postman, a great tool to examine RESTful APIs in a single user interface. This is a Self-Paced Standalone Lab, where we will build upon the foundational knowledge acquired in the previous labs. For this lab, we will concentrate on Catalyst Center configuration and how Catalyst Center can be automated to perform various functions we have already covered. The lab is intended to help drive the adoption of Rest-API and includes multiple use cases to solve common orchestration needs when using Catalyst Center.
Within this series, we cover the following;
- PnP Preparation – explains the overall Plug and Play set up steps
- Onboarding Templates – explains in-depth how to deploy Day 0 templates
- Day N Templates – dives into Day N template constructs with both regular and composite templates and use cases
- Application Policys – explores Application Policys and SD-AVC in Catalyst Center and their use
- Telemetry – explains how to deploy Telemetry for assurance
- Advanced Automation – explores Advanced Automation techniques
- Dynamic Automation – a deployment lab for dynamic automation
Catalyst Center Rest-API Collections
Additionally, we have provided a Postman Public Workspace where all the Rest-API Collections are included so that engineers can rapidly access and set up their environments. “Sometimes seeing is believing.” We hope these new tools help explain how to best use the Rest-APIs and augment the information from developer.cisco.com.
In this lab, we will continually add more use cases to answer specific orchestration needs, but always in Postman, where they may be analyzed and viewed in operation for inclusion in whatever automation or orchestration system requires them. In upcoming modules, we will also delve into published and unpublished Rest-API and how to discover and work with those to accomplish your orchestration needs.
Within this lab modules, we cover the following utilizing collections for orchestration with the aid of a comma-separated values (CSV) file;
- Postman Orientation – orientates you to Postman and helps prepare the tools
- Building Hierarchy – the orchestration of building hierarchy
- Assign Settings and Credentials – assigning settings and credentials
- Device Discovery – orchestrating device discovery
- Template Deployment – automating template deployment
- Configuration Archive – automating configuration archiving
- Retrieving Network Inventory – collecting a network inventory
- Running Show Commands – collecting show command results
Unlike most previous Labs in the series, this lab is self-contained and has no dependencies on any previous labs. While you can add concepts from Labs 5 and 6 to this lab, it is designed to have no pre-configuration. It utilizes various automation techniques to show the complete art of the possible from Software-Defined Networking.
What will I learn in the Rest-API Orchestration Lab?
This is an enablement-type lab, allowing engineers and architects to reach beyond what they currently understand by trying new concepts and pushing the boundaries of automation and orchestration. We will cover various topics about Rest-API logic to solve multiple use cases during this lab. We cover some previous concepts with an in-depth focus on broadening their capabilities through the art of doing and examining.
The concept of this lab is for you to build the environment from the ground up, from Design to Discovery to Template Deployment. The use of DCLOUD or the DevNet Sandbox allows a safe place for you to try, modify, and get used to the various concepts and approaches.
Approach
The Lab is built for minimal intervention using things like Rest-API run via Postman within a collection runner to quickly configure Catalyst Center. This allows us to deploy Settings, Credentials, Discover Devices, Build Sites, Buildings, Floors, and assign the devices to those sites. These are powerful examples of what we can do, and they demonstrate how quickly we can get Catalyst Center up and running utilizing Rest-API using just one tool.
But wait, there is more…
We provisioned a comma-separated value (CSV) file for use with the Postman collections to make it easy to build the design and deploy templates where necessary.
You can easily add the Public Workspace to Postman via the following link. This will allow you to rapidly start using the Rest-API suite created for this lab. Click the following link and log into your Postman account, and the workspace, including the collections and the environment, will be automatically added. (see image below)
Public Catalyst Center Use-Case API Collection
We keep Postman Public Workspace up to date with the lab so that the lab helps document the collection, and the collections help drive the lab. Within the Workspace are currently several collections and an environment.
Use Cases
We will cover various topics in several use cases based on lab modules to show the capability and flexibility of the Rest-APIs with Catalyst Center.
The various topics/use-cases we will touch on and deploy within the lab consist of the following:
- Using Rest-API to configure Catalyst Center Design and Settings using a CSV file
- Automation of assigning Credentials across the network
- Orchestrating Discovery to onboard network devices
- Automating the Provisioning of Regular and Composite Templates to Devices
- Retrieving Device Inventory information
- Orchestration of Configuration Archives
- Retrieving Show Command results from Catalyst Centers Command Runner
With that, the lab utilizes these topics…
We will gain a practical understanding of the steps associated with utilizing Rest-API while setting up a Catalyst Center and an environment to support complex, advanced, regular templates to deliver device configuration during these labs. The labs aim to aid engineers in rapidly beginning to use Catalyst Center automation and help them work towards a global template strategy. Additionally, these labs will give customers a permanent place to try out the regular and composite templates and include configurations for various use cases. Finally, this environment will enable engineers to reduce the time and effort needed to instantiate the network.
Starting…
Within DCLOUD, several sandbox-type labs are available. These self-contained environments are there to allow you to use them as you please within the time scheduled. In addition, this allows us a place to start practicing various concepts without fear of impacting production environments.
As a result, we hope to demystify some of the complexities of setting up automation and help guide customers through the caveats. Therefore, to aid customers in the transition toward automation, we have put together a set of small helpful labs within a GitHub repository. This way, these self-guided labs provide a glimpse into the fundamentals of building velocity templates and offer examples you can download and expand from. In addition, the sample templates and JSON files supplied are for easy import into Catalyst Centers’ template editor for quicker adoption. Lastly, some scripts are ready-made excerpts of code that allow you to build the environment to test.
In this practical lab, REST-API Orchestration, we step by step delve into advanced automation methods and ways to utilize them to solve various use cases. Second, we provide answers and explanations to many of the questions that come up during automation workshops. We hope that you find the information both helpful and informative.
Where can I test and try these labs?
DCLOUD Lab Environment
To help customers succeed with Cisco Catalyst Center automation, you may utilize the above labs as they have been designed to work within DCLOUD’s Cisco Enterprise Networks Hardware Sandbox Labs in either:
- Cisco Enterprise Networks Hardware Sandbox West DC
- Cisco Enterprise Networks Hardware Sandbox East DC
The DCLOUD labs allow you to run these labs and give an environment to try the various code samples. You may develop and export your code for use in production environments. Also, this gives you an environment where you can safely POC/POV methods and steps without harming your production environments. The DCLOUD environment also negates the need for shipping equipment, lead times, and licensing issues needed to move rapidly. Please adhere to the best practices for the DCLOUD environment when using it.
Lab Connectivity
The environment allows for a web-based browser client for VPN-less connectivity. Additionally, there is AnyConnect VPN client connectivity for those who prefer it. Choose the Cisco Enterprise Network Sandbox. Additionally, you may choose from our RTP Facilities labs by selecting US West. To access this or other content, demonstrations, and labs in DCLOUD, please directly work with your Cisco or Partner Account Team. Your Account teams will schedule the session and share it for you to use. Once booked, follow the guide within GitHub to complete the tasks adhering to the best practices of the DCLOUD environment.
Content
The REST-API Orchestration lab content is located within the existing DNAC-TEMPLATES repository to give a one-stop shop for all the necessary tools, scripts, templates, and code samples. Within it are seven labs, which build upon the tutorials to test the methods in a lab environment. The repository was featured in a previous post on Cisco Blogs about Catalyst Center Templates earlier in May 2021.
Additional Information
Catalyst Center Template Labs
The previously named DNAC Template LABS within the DNAC-TEMPLATES GitHub repository aims to guide you through the typical steps required to enable the various automation tasks delivered by Catalyst Center. This lab will give examples of templates used in Catalyst Center that we can modify for our use and test on equipment within the LAB environment. Additional information within the lab provides a well-rounded explanation of Automation methods with Templates. Lastly, the lab allows for customers to use Catalyst Center workflows to practice deploying Onboarding, DayN Templates, and Application Policy automation on both Wired and Wireless Platforms.
The goal of this lab is for it to be a practical guide to aid engineers to rapidly begin using Catalyst Center automation and help them work towards a deployment strategy. Additionally, this lab will give customers a permanent place to try out the configurations for various use cases. Finally, this environment will enable engineers to reduce the time and effort needed to instantiate the network.
As a result, you will gain experience in setting up Plug and Play onboarding and templates and utilizing all features. Additionally, you will use advanced templating methods and troubleshooting tools. These may help during faultfinding to determine what is failing in a deployment.
New Catalyst Center Lab Content
Please use this menu to navigate the various sections of this GitHub repository. Within the multiple folders are examples and explanation readme files for reference. There are now two sets of labs, and these are being continually expanded upon.
This newer and more modular lab approach is designed to deal with and includes concepts from the legacy labs in a newer more modular format.
- Lab 1 Wired Automation – Covers green and brown field use cases (allow 4.0 hrs)
- Lab 2 Wireless Automation – Covers traditional wireless automation (allow 4.0 hrs)
- Lab 4 Rest-API Orchestration – Covers automation of Cisco Catalyst Center via Postman with Rest-API (allow 2.0 hrs)
- Lab 7 CICD Orchestration – Covers Python with JENKINS orchestration via REST-API (allow 4.0 hrs)
We will share additional labs and content in an ongoing effort to fulfill all your automation needs with Catalyst Center.
In conclusion, if you found this set of labs and repository helpful,
please fill in comments and feedback on how it could be improved.
We’d love to hear what you think. Ask a question or leave a comment below.
And stay connected with Cisco on social!
Check out our Cisco Networking video channel
Subscribe to the Networking Blog
Share: